package com.zhongge.preknow.proxy;

/**
 * @ClassName Test
 * @Description TODO 客户端
 * @Author zhongge
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        //创建管理员代理对象
        ProxyUser adminProxy = new ProxyUser(new AdminUser("刘备", 1));

        //创建普通用户的代理对象
        ProxyUser normalProxy = new ProxyUser(new NormalUser("关羽", 2));

        adminProxy.addBook("java");

        normalProxy.borrowBook("python");
    }
}
